namespace Maple.Branch.Permissions.Controllers
{
    using System.Threading.Tasks;
    using Consts;
    using Dtos;
    using IAppServices;
    using Volo.Abp;
    using Volo.Abp.AspNetCore.Mvc;

    [RemoteService(Name = PermissionsModuleConsts.RemoteServiceName)]
    public class PermissionsController : AbpController, IPermissionAppService
    {
        protected IPermissionAppService PermissionAppService { get; }

        public PermissionsController(IPermissionAppService permissionAppService)
        {
            PermissionAppService = permissionAppService;
        }

        public virtual Task<GetPermissionListResultDto> GetAsync(string providerName, string providerKey)
        {
            return PermissionAppService.GetAsync(providerName, providerKey);
        }

        public virtual Task UpdateAsync(string providerName, string providerKey, UpdatePermissionsDto input)
        {
            return PermissionAppService.UpdateAsync(providerName, providerKey, input);
        }
    }
}
